<?php

namespace App\Http\Requests\App;

use App\Http\Requests\ApiRequest;

/**
 * @deprecated - App 不清理 - 线上已经使用 v2 接口
 *
 * @property int skin_detector_id
 * @property string wax_sid
 * @property string sex
 */
class RecommendProductIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'skin_detector_id' => 'required|int|in:1,2,3',
            'wax_sid'          => 'required_if:skin_detector_id,2|int|in:1,2,3,4,5',
            'sex'              => 'sometimes|required|in:0,1,2',
        ];
    }

}
